const path = require('path');

module.exports = {
    target: "node",
    mode:"production",
    entry: './src/extension.ts',
    output: {
        filename: 'extension.js',
        path: path.resolve(__dirname, 'dist'),
        libraryTarget: 'commonjs',
    },
    resolve: {
        extensions: ['.tsx', '.ts',".js"],
    },
    module: {
        rules: [
            {
                test: /\.tsx?$/,
                use: { loader: 'ts-loader', options: { configFile: path.resolve(__dirname, './tsconfig.json') } },
                exclude: /node_modules/,
            },
        ]
    },
    externals: {
        'vscode': 'commonjs vscode', // ignored because it doesn't exist
    },
};